package com.twu.biblioteca.representation.factory;

import com.twu.biblioteca.representation.command.*;

public class CommandFactory {

    public static Command createCommand(String name) {

        Command command=null;

        if(name.equals("BookView")) {
            command = new BookViewCommand();
        }
        else if(name.equals("BookReserve")) {
            command = new BookReserveCommand();
        }
        else if(name.equals("MovieView")) {
            command = new MovieViewCommand();
        }
        else if(name.equals("Login")) {
            command = new LoginCommand();
        }
        else if(name.equals("UserView")) {
            command = new UserViewCommand();
        }
        return command;
    }

}
